home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BMUG PD-ROM BV3
/
BMUG PD-ROM Version BV3 (CDRM1097900).iso
/
HyperCard
/
Games
/
HyperArchy
/
HyperArchy
/
background_2605.txt
< prev
next >
Wrap
Text File
|
1990-02-11
|
12KB
|
547 lines
-- background: 2605 from stack: in
-- bmap block id: 3303
-- flags: 0000
-- background id: 0
-- name:
----- HyperTalk script -----
on newCard
global childStackName, parentStackName, parentName, parentID, selfName, selfID
set cursor to watch
put field "Child Stack Name" of first card into field "Child Stack Name" of this card
put parentStackName into field "Parent Stack Name"
put parentName into field "Parent Name"
put parentID into field "Parent ID"
put empty into field "Child IDs"
put short id of this card into field "Self ID"
-- tell the parent about new child
put field "Parent ID" into parentID
put field "Parent Stack Name" into parentStackName
if parentID is not empty then
put short id of this card into selfID
push card
go to card ID parentID of stack parentStackName
put selfID & return after field "Child IDs"
pop card
end if
pass newCard
end newCard
on doMenu text
if text is "New Stack..." or text is "Copy Card" or text is "Cut Card" then
beep
exit doMenu
end if
pass doMenu
end doMenu
-- part 47 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=76 top=21 right=42 bottom=500
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part 16 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=76 top=43 right=63 bottom=500
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Self Name
----- HyperTalk script -----
on closeField
-- send field updates to children
if hilite of background button "Debug" is false then lock screen
if field "Child IDs" is not empty then
set cursor to watch
put 1 into childPoint
put field "Child Stack Name" into childStackName
put field "Self Name" into selfName
repeat for the number of lines in field "Child IDs"
put line childPoint of field "Child IDs" into childID
push card
go to card ID childID of stack childStackName
put empty into field "Parent Name"
put selfName into field "Parent Name"
pop card
add 1 to childPoint
end repeat
end if
unlock screen
end closeField
-- part 18 (field)
-- low flags: 01
-- high flags: 0007
-- rect: left=11 top=64 right=194 bottom=74
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Child IDs
-- part 19 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=11 top=21 right=42 bottom=58
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Parent ID
-- part 20 (field)
-- low flags: 03
-- high flags: 0002
-- rect: left=76 top=21 right=42 bottom=500
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Parent Name
-- part 21 (field)
-- low flags: 03
-- high flags: 0002
-- rect: left=11 top=43 right=63 bottom=58
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 4
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Self ID
-- part 22 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=200 top=315 right=337 bottom=300
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Create Child
----- HyperTalk script -----
on mouseUp
global childStackName, parentStackName, parentName, parentID, selfName, selfID
set cursor to watch
if hilite of background button "Debug" is false then lock screen
put short name of this stack into parentStackName
put field "Self Name" into parentName
put short ID of this card into parentID
put field "Child Stack Name" into childStackName
go to stack childStackName
doMenu "New Card"
unlock screen with scroll up
select text of field "Self Name"
end mouseUp
-- part 23 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=304 top=315 right=337 bottom=404
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Delete
----- HyperTalk script -----
on mouseUp
-- warn
put the number of lines in field "Child IDs" into numChild
answer "This card has" && numChild && "children. Delete?" with "OK" or "Cancel"
if it is "Cancel" then exit mouseUp
set cursor to watch
if hilite of background button "Debug" is false then lock screen
deleteCard
unlock screen with barn door close
end mouseUp
on deleteCard
-- kill the childern
if field "Child IDs" is not empty then
repeat until field "Child IDs" is empty
put last line of field "Child IDs" into childID
put field "Child Stack Name" into childStackName
push card
go to card ID childID of stack childStackName
send deleteCard to background button "Delete"
pop card
end repeat
end if
-- tell the parent
if field "Parent ID" is not empty then
put field "Parent Stack Name" into parentStackName
put field "Parent ID" into parentID
put field "Self ID" into selfID
push card
go to card ID parentID of stack parentStackName
find selfID in field "Child IDs"
delete the foundLine
pop card
end if
-- kill self
doMenu "Delete Card"
end deleteCard
-- part 27 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=200 top=291 right=313 bottom=300
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Create Peer
----- HyperTalk script -----
on mouseUp
global childStackName, parentStackName, parentName, parentID, selfName, selfID
set cursor to watch
if hilite of background button "Debug" is false then lock screen
put field "Child Stack Name" into childStackName
put field "Parent Stack Name" into parentStackName
put field "Parent Name" into parentName
put field "Parent ID" into parentID
doMenu "New Card"
unlock screen with scroll left
select text of field "Self Name"
end mouseUp
-- part 30 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=96 top=291 right=313 bottom=196
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Sort: Parent
----- HyperTalk script -----
on mouseUp
sort by field "Parent Name"
end mouseUp
-- part 32 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=76 top=64 right=84 bottom=500
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Parent Stack Name
-- part 31 (field)
-- low flags: 02
-- high flags: 0002
-- rect: left=76 top=85 right=105 bottom=500
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Child Stack Name
-- part 34 (button)
-- low flags: 00
-- high flags: C006
-- rect: left=447 top=313 right=339 bottom=508
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Debug
----- HyperTalk script -----
on mouseUp
if the hilite of me is true then
hide field "Parent ID"
hide field "Self ID"
hide field "Child IDs"
hide field "Parent ID"
hide field "Parent Stack Name"
hide field "Child Stack Name"
show field "Data"
hide menubar
end if
if the hilite of me is false then
hide field "Data"
show field "Parent ID"
show field "Self ID"
show field "Child IDs"
show field "Parent ID"
show field "Parent Stack Name"
show field "Child Stack Name"
show menubar
end if
set the hilite of me to not (the hilite of me)
end mouseUp
-- part 35 (field)
-- low flags: 80
-- high flags: 0007
-- rect: left=9 top=68 right=280 bottom=500
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Data
-- part 40 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=96 top=315 right=337 bottom=196
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Sort: Name
----- HyperTalk script -----
on mouseUp
sort by field "Self Name"
end mouseUp
-- part 42 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=58 top=297 right=325 bottom=88
-- title width / last selected line: 0
-- icon id / first selected line: 27009 / 27009
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: To Next Peer
----- HyperTalk script -----
on mouseUp
visual effect scroll left
go to next card
end mouseUp
-- part 43 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=2 top=297 right=325 bottom=32
-- title width / last selected line: 0
-- icon id / first selected line: 9301 / 9301
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: To Previous Peer
----- HyperTalk script -----
on mouseUp
visual effect scroll right
go to previous card
end mouseUp
-- part 45 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=31 top=281 right=312 bottom=59
-- title width / last selected line: 0
-- icon id / first selected line: 32488 / 32488
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: To Parent
----- HyperTalk script -----
on mouseUp
if the commandKey is down then -- force down a level
put field "Parent Stack Name" into parentStack
visual effect scroll down
go to first card in stack parentStack
exit mouseUp
end if
if field "Parent ID" is empty then exit mouseUp
put field "Parent ID" into parentID
put field "Parent Stack Name" into parentStack
visual effect scroll down
go to card id parentID in stack parentStack
end mouseUp
-- part 46 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=31 top=312 right=342 bottom=59
-- title width / last selected line: 0
-- icon id / first selected line: 2335 / 2335
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: To Last Child
----- HyperTalk script -----
on mouseUp
if the commandKey is down then -- force down a level
put field "Child Stack Name" into childStackName
visual effect scroll up
go to first card in stack childStackName
exit mouseUp
end if
if field "Child IDs" is not empty then
put last line of field "Child IDs" into childID
put field "Child Stack Name" into childStackName
visual effect scroll up
go to card id childID in stack childStackName
end if
end mouseUp
-- part 48 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=304 top=291 right=313 bottom=404
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Terms
----- HyperTalk script -----
on mouseUp
if hilite of me is false then
set hilite of me to true
show field "Terms"
else
set hilite of me to false
hide field "Terms"
end if
end mouseUp
-- part 49 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=76 top=21 right=274 bottom=504
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: Terms
----- HyperTalk script -----
on mouseUp
set hilite of bkgnd btn "Terms" to false
hide me
end mouseUp